package com.cybertooth.dbconvenience.query.enums;

import com.cybertooth.dbconvenience.query.core.SqlTransformer;

/**
 * <p></p>
 *
 * @author dnelson
 */
public enum ComparisonOperator implements SqlTransformer {
	/**
	 * Equal To.
	 */
	EQ("="),
	/**
	 * Not Equal To.
	 */
	NE("!="),
	/**
	 * Greater Than.
	 */
	GT(">"),
	/**
	 * Greater Than And Equal To.
	 */
	GTE(">="),
	/**
	 * Less Than.
	 */
	LT("<"),
	/**
	 * Less Than And Equal To.
	 */
	LTE("<=");

	// -----------------------------------------------------------------------Fields

	private String sqlRepresentation;

	// -----------------------------------------------------------------Constructors

	ComparisonOperator(String sqlRepresentation) {
		this.sqlRepresentation = sqlRepresentation;
	}

	// ---------------------------------------------------------------Public Methods

	/**
	 * {@inheritDoc}
	 */
	@Override
	public String toSql() {
		return new StringBuilder().append(" ").append(this.sqlRepresentation).append(" ")
				.toString();
	}
}
